<?php

include '../DB/dbConnection.php';

$result=array();

if ($_POST){
		
	$query = "UPDATE teachers SET empno=?,name=?,dob=?,eployment_date=?,position=?,adhar=?,gender=?,maritial_status=?,image=?,cell_number=?,landline=?,email=?,village=?,city=?,district=?,state=?,zip=?,address=?,degree=?,certificate=?,experience=?,school_id=? WHERE id=?";
	
	$stmt = $conn->prepare($query);
	$stmt->bind_param("ssssssssssssssssissssii",$_POST['empno'],$_POST['name'],$_POST['dob'],$_POST['eployment_date'],$_POST['position'],$_POST['adhar'],$_POST['gender'],$_POST['maritial_status'],$_POST['image'],$_POST['cell_number'],$_POST['landline'],$_POST['email'],$_POST['village'],$_POST['city'],$_POST['district'],$_POST['state'],$_POST['zip'],$_POST['address'],$_POST['degree'],$_POST['certificate'],$_POST['experience'],$_POST['school_id'],$_POST['id']);
	$success = $stmt->execute();
	$stmt->close();
	$conn->close();
	
	if($success)
		$result['error']='false';
	else
		$result['error']='true';
}
else
{
	$result['error']='true';
}

echo json_encode($result);

?> 
